// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    reset: cc.Node = null;
    next: cc.Node = null;

    onLoad () {
        this.reset = cc.find('bg02/reset', this.node)
        this.next = cc.find('bg02/next', this.node)

        this.reset.on('touchstart', this.onHide, this)
        this.next.on('touchstart', this.onHide, this)
    }

    start () {

    }

    onHide(){
        this.node.active = false;

        cc.find('Canvas/bg').getComponent('LoadStaticScript').reset()
    }

    // update (dt) {}
}
